package com.atguigu.mybatis.mapper;

import com.atguigu.mybatis.entity.Tiger;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface TigerMapper {

    int insertTiger(Tiger tiger);

    int deleteTigerById(Integer tigerId);

    int updateTigerById(Tiger tiger);

    Tiger selectTigerById(Integer tigerId);

    List<Tiger> selectTigerList();

    void createTable(String tableName);

    void insertTigerBySeveralValue(
            @Param("tigerName") String tigerName,
            @Param("tigerAge") int tigerAge,
            @Param("tigerSalary") double tigerSalary);

    void insertTigerByMap(Map<String, Object> map);

    double selectAvgSalary();

    Map<String, Object> selectTigerForMap(int tigerId);

    List<Map<String, Object>> selectAllForMap();

    int insertTigerWithAutoPK(Tiger tiger);

    List<Tiger> selectTigerListUseResultMap();
}
